package com.yunchao.feature.base

import com.google.gson.GsonBuilder
import com.seuic.scankey.ScanKeyService
import com.yunchao.feature.base.data.CustomAudioManager
import com.yunchao.feature.base.domain.utils.FileStorageManager
import com.yunchao.feature.base.presentation.nav.NavManager
import com.yunchao.library.device.DeviceHelperImpl
import com.yunchao.library.lock.DeviceHelper
import org.koin.android.ext.koin.androidApplication
import org.koin.dsl.module


const val HTTP_DOMAIN_INPUT_URL = "HTTP_DOMAIN_INPUT_URL"

val baseModule = module {

    single { NavManager() }

    single { ScanKeyService.getInstance() }

    single<DeviceHelper> { DeviceHelperImpl(get()) }

    single { CustomAudioManager(get()) }

    single { FileStorageManager(androidApplication()) }


    single {
        GsonBuilder()
            .serializeNulls()
            .setPrettyPrinting()
            .setDateFormat("yyyy-MM-dd HH:mm:ss:SSS")
            .create()
    }

}